home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / IDLIncludes / DesktopAnimDraw.idl < prev    next >
Text File  |  1996-05-01  |  5KB  |  131 lines

  1. /*
  2.      File:        DesktopAnimDraw.idl
  3.  
  4.      Contains:    Declarations for the SOM based Screen Saver/Desktop drawing object.
  5.  
  6.      Version:    Technology:    3/5/96    2/15/96    2/1/96    1/29/96    1/22/96    12/7/95    12/2/95    12/1/95    11/23/95    8/11/95 DesktopAnimation.i <9> <8> <7> <6> <5> <4> <3> <2> <1>
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1995-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16. */
  17.  
  18.  
  19. #ifndef __DESKTOPANIMDRAW_IDL__
  20. #define __DESKTOPANIMDRAW_IDL__
  21.  
  22. #define USE_OLD_WINDOWREFS    1
  23.  
  24. #include <AppleEvents.idl>
  25. #include <DesktopAnimBase.idl>
  26. #if !USE_OLD_WINDOWREFS
  27.     #include <HIWindows.idl>
  28. #endif
  29. #include <Quickdraw.idl>
  30.  
  31. interface DesktopAnimDraw : DesktopAnimBase
  32. {
  33.     /* initialization/destruction */
  34.     OSStatus     Initialize(in AVIDType prefsDisplayID, in DesktopAnimModuleDescRef moduleDescRef,
  35.                         in DesktopAnimModuleInfo moduleInfo);
  36. #if USE_OLD_WINDOWREFS
  37.     OSStatus    Open(in RgnHandle fullRgn, in WindowRef drawWindow, in TextObject errorText,
  38.                         inout AbsoluteTime nextAnimateTime);
  39. #else
  40.     OSStatus    Open(in RgnHandle fullRgn, in HIWindow drawWindow, in TextObject errorText,
  41.                         inout AbsoluteTime nextAnimateTime);
  42. #endif
  43.     OSStatus    Close();
  44.     
  45.     /* Screen Savers only */
  46.     OSStatus    OpenRequest(in DesktopAnimModuleInfo moduleInfo, in TextObject errorText,
  47.                         out boolean initializeOK);
  48.     OSStatus    CloseRequest(in ScreenSaverUnfadeType unfadeReason, out boolean terminateOK);
  49.  
  50.     /* Animation */
  51.     OSStatus    Animate(in DesktopAnimFlags drawFlags, inout AbsoluteTime nextAnimateTime);
  52.     OSStatus    GetAnimateDrawingRgn(in RgnHandle drawRgn);
  53.  
  54.     /* Drawing */
  55.     OSStatus    Draw(in RgnHandle drawRgn, in AVIDType displayID, in DesktopAnimGraphicsPorts drawingPorts,
  56.                         in DesktopAnimFlags drawFlags, in boolean doFullDraw);
  57.     OSStatus    DrawBackgroundRgn(in RgnHandle drawRgn, in AVIDType displayID,
  58.                         in DesktopAnimGraphicsPorts drawingPorts, in DesktopAnimFlags drawFlags,
  59.                         in boolean doFullDraw);
  60.                  
  61.     /* Offscreen support */
  62.     OSStatus    CreateOffscreenGraphicsPorts(in SInt16 depth, in Rect boundsRect, in CTabHandle colorTable,
  63.                         out DesktopAnimOffscreenGraphicsPorts offDrawingPorts);
  64.     void        DisposeOffscreenGraphicsPorts(in DesktopAnimOffscreenGraphicsPorts offDrawingPorts);
  65.     void        SetOriginOffscreenGraphicsPorts(in Point newOrigin, in DesktopAnimOffscreenGraphicsPorts offDrawingPorts);
  66.     
  67.     /* Events */
  68.     OSStatus    HandleAppleEvent(in AppleEvent theAppleEvent, in AppleEvent reply);
  69. #if USE_OLD_WINDOWREFS
  70.     OSStatus    SetModuleMode(in DesktopAnimFlags drawFlags, in RgnHandle fullRgn, in WindowRef drawWindow,
  71.                         inout AbsoluteTime nextAnimateTime);
  72. #else
  73.     OSStatus    SetModuleMode(in DesktopAnimFlags drawFlags, in RgnHandle fullRgn, in HIWindow drawWindow,
  74.                         inout AbsoluteTime nextAnimateTime);
  75. #endif
  76.     OSStatus    UpdateModuleProperty(in CollectionTag tag, in UInt32 propDataSize, in void* propData,
  77.                         inout AbsoluteTime nextAnimateTime, out boolean needsRedraw);
  78.     
  79.     /* Accessors */
  80.     DesktopAnimDraw        GetBackgroundDrawer();
  81.     void                GetModuleInfo(out DesktopAnimModuleInfo moduleInfo);
  82.     void                SetBackgroundDrawer(in DesktopAnimDraw backgroundDrawer);
  83.     void                SetModuleInfo(in DesktopAnimModuleInfo moduleInfo);
  84.         
  85.     /* attributes */
  86.     attribute boolean                        fAnimates;
  87.     attribute RgnHandle                        fDesktopRgn;
  88. #if USE_OLD_WINDOWREFS
  89.     readonly attribute WindowRef            fDrawWindow;
  90. #else
  91.     readonly attribute HIWindow                fDrawWindow;
  92. #endif
  93.     
  94. #ifdef __SOMIDL__
  95. implementation
  96.     {
  97.         passthru C_h =  "#include <Events.h>"
  98.                         "#include <Quickdraw.h>"
  99. #if USE_OLD_WINDOWREFS
  100.                         ;
  101. #else
  102.                         "#include <HIWindows.h>";
  103. #endif
  104.                         
  105.         passthru C_xh = "#include <Events.h>"
  106.                         "#include <Quickdraw.h>"
  107. #if USE_OLD_WINDOWREFS
  108.                         ;
  109. #else
  110.                         "#include <HIWindows.xh>";
  111. #endif
  112.         
  113.         
  114.         /* Release Order.  Note, only append to the end of this
  115.          * list, so that the base class is forward compatible. */
  116.         releaseorder:    fDesktopRgn, fDrawWindow, fAnimates,
  117.         
  118.                         _get_fDesktopRgn, _set_fDesktopRgn, _get_fDrawWindow,
  119.                         _get_fAnimates, _set_fAnimates,
  120.                         Initialize, Open, Close, OpenRequest, CloseRequest,
  121.                         Draw, DrawBackgroundRgn, HandleAppleEvent, SetModuleMode,
  122.                         UpdateModuleProperty, GetModuleInfo,
  123.                         GetBackgroundDrawer, SetBackgroundDrawer, Animate,
  124.                         SetModuleInfo, GetAnimateDrawingRgn, CreateOffscreenGraphicsPorts,
  125.                         DisposeOffscreenGraphicsPorts, SetOriginOffscreenGraphicsPorts;
  126.     };
  127. #endif
  128. };
  129.  
  130. #endif
  131.